<!DOCTYPE html>
<html>
<head>
    {include file="common/head"}
    <style type="text/css">
        .pricing-header img { width: 19px;}
    </style>
</head>
<body>
    {include file="common/menu"}

    {hkcms:adv name="sub" itemid="1"}
    <section class="bg-banner" style="background-image: url({$item.image});">
        <div class="container">
            <div class="position-relative overflow-hidden p-3 p-xl-4 text-center">
                <div class="col-xl-6 p-lg-5 mx-auto my-5">
                    <h1 class="title mb-3">{$Cate.title}</h1>
                    <p class="lead fw-normal">{hkcms:breadcrumb class="active_a" symbol=" / " /}</p>
                </div>
            </div>
        </div>
    </section>
    {/hkcms:adv}

    <section class="company sec_pad pb-4 singlepage">
        <div class="container">
            <div class="pricing-header pb-xl-4 mx-auto text-center contact-html">
                <div class="card mb-3">
                    <div class="row g-0 col-xl-12">
                        <div class="py-3 col-xl-4">
                            <h5 class="mb-3">{$site.title}</h5>
                            <p class="card-text">{:lang('Contact details')}：{$Info.contact_info}</p>
                            <p class="card-text">{:lang('Contact email')}：{$Info.email}</p>
                            <p class="card-text">{:lang('Contact address')}：{$Info.address}</p>
                        </div>
                        <div class="col-xl-8">
                            {:hook("showMap", ['attr'=>['style'=>'width:100%;height:350px;border:#ccc solid 1px;','id'=>'dituContent'],'title'=>$Info['company'],'address'=>$Info['address'],'scale'=>17,'point'=>$Info['point']])}
                        </div>

                        <div class="col-xl-12 my-3">
                            {//captcha=1,开启验证码之后在下面自定义验证码表单}
                            {hkcms:guestbook catid="34" captcha="1"}
                            {// 获取栏目名称}
                            <h5 class="my-3">{$item['category']['title']??''}</h5>
                            {// 请求地址}
                            <form action="{$item.action}" method="post">
                                <div class="row g-2 mb-3">
                                    <div class="col-md">
                                        <div class="form-floating">
                                            <input type="text" class="form-control" name="{$item.field.name|default=''}" id="name">
                                            <label for="name">{:lang('Name')}</label>
                                        </div>
                                    </div>
                                    <div class="col-md">
                                        <div class="form-floating">
                                            <input type="email" class="form-control" name="{$item.field.email|default=''}" id="email">
                                            <label for="email">{:lang('Mail')}</label>
                                        </div>
                                    </div>
                                    <div class="col-md">
                                        <div class="form-floating">
                                            <input type="text" class="form-control" name="{$item.field.phone|default=''}" id="phone">
                                            <label for="phone">{:lang('Telephone')}</label>
                                        </div>
                                    </div>
                                </div>
                                <div class="row g-2 mb-3">
                                    <div class="col-md">
                                        <div class="form-floating">
                                            <textarea class="form-control" id="content" name="{$item.field.content|default=''}"></textarea>
                                            <label for="content">{:lang('Content')}</label>
                                        </div>
                                    </div>
                                </div>
                                <div class="row g-2 mb-3">
                                    <div class="col-md-4">
                                        <div class="form-floating">
                                            <input class="form-control" id="captcha" name="{$item.captcha.field}" />
                                            <label for="content">{:lang('Verify code')}</label>
                                        </div>
                                    </div>
                                    <div class="col-md-2">
                                        <a href="javascript:changeVer();"><img id="captcha-img" src="{$item.captcha.url}" data-url="{$item.captcha.url}" style="width: 180px"></a>
                                    </div>
                                </div>
                                <button type="submit" class="btn btn-primary">{:lang("Submit")}</button>
                            </form>
                            {/hkcms:guestbook}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    {include file="common/footer"}

    <script>
        // 更换验证码
        function changeVer() {
            $('#captcha-img').attr('src',$('#captcha-img').data('url')+"?r="+Math.random());
            return false;
        }
    </script>
</body>
</html>